import random

def generate_data(n=3, m=2, max_price=10, max_count=5):
    """
    随机生成大礼包问题的数据
    :param n: 商品种类数
    :param m: 大礼包数量
    :param max_price: 单品和礼包最大价格
    :param max_count: 单品和礼包最大数量
    :return: price, special, needs
    """
    price = [random.randint(1, max_price) for _ in range(n)]
    special = []
    for _ in range(m):
        offer = [random.randint(0, max_count) for _ in range(n)]
        offer.append(random.randint(1, max_price * n))  # 礼包价格
        special.append(offer)
    needs = [random.randint(0, max_count) for _ in range(n)]
    return price, special, needs

if __name__ == "__main__":
    price, special, needs = generate_data()
    print("单品价格：", price)
    print("大礼包：", special)
    print("需求：", needs)